<?php
if ($this->session->userdata('logged_in') == TRUE) {
    $this->load->view('view_login_success');
}
?>
<?php $this->load->view('view_pageheader'); ?>
<label class="content_linkBack"><a onClick='window.history.go(-1)'>< Back</a></label>
<label class="content_this">| GROUP PERSON & GROUP MENU CONTROL</label>
<style type="text/css">
    table.register {
        margin: auto;
        margin-top: 5px;
        border: #010101 solid 1px;
        border-left-style: none;
        border-right-style: none;
        text-align: center;
        padding: 5px 5px;
        
    }
    table.register th {
        color: #000;
        border: #ecebeb solid 1px;
    }
    table.register td {
        border: #ecebeb solid 1px;
    }
    table.register tr:hover {
        background-color: #ffcc99;
    }
    table.register tr td > a {
        cursor: pointer;
    }
</style>
<div style="border: red hidden 1px; width: 100%;">
    <table border="0" cellpadding="5" class="register">
        <tr style="text-align: right; background: #fff;">
            <td colspan="9">

            </td>
        </tr>
        <tr style="background-color: #fff">
            <th>ID</th>
            <th colspan="3" style="width: 150px">GROUP-PERSON NAME</th>
            <th colspan="3" style="width: 300px">GROUP-MENU NAME</th>
            <th>EDIT</th>
            <th>DELETE</th>
        </tr>
       
            <?php foreach ($gperson as $show) { ?>
                <tr>
                    <td><?php echo $show->gperson_id . "<br />"; ?></td>
                    <td colspan="3" style="width: 150px; background-color: #96F7ED"><?php echo $show->gperson_name . "<br />"; ?></td>
                    <td colspan="3" style="width: 300px; background-color: #96F7ED"></td>
                    <td><div align="center">  
                    <form action="Editcontrolpage" id="editgperson" name="editgperson" method="post">
                    <?
                        echo '<input type="image" src="../../images/4.png" name="image" />';
                        echo '<input type="hidden" name="editgperson" value="' .$show->gperson_id . '" />';
                    ?>
                    </form>
                    </div></td>
                    <td><div align="center">  
                    <form action="group_control" id="deletecontrolgroup" name="deletecontrolgroup" method="post">
                    <?
                        echo '<input type="image" src="../../images/5.png" name="image" />';
                        echo '<input type="hidden" name="deletecontrolgroup" value="' .$show->gperson_id . '" />';
                    ?>
                    </form>
                    </div></td>
                </tr>
                <?php foreach ($gmenu as $row) { 
                    if($show->gperson_id==$row->gperson_id) {
                ?>
                <tr>
                    <td></td>
                    <td colspan="3" style="width: 150px"></td>
                    <td colspan="3" style="width: 300px"><div align="left">
                        :::: <?php echo $row->gmenu_name . "<br />"; ?>
                    </div></td>
                    <td></td>
                    <td></td>
                </tr>
                <?php } } ?>
            <?php } ?>
        
    </table>
</div>
<?php $this->load->view('view_pagefooter'); ?>